Skip to content
This repository was archived by the owner on Jan 23, 2026. It is now read-only.

Deploy: fixed error missing file on zip#354

Merged
jhaynie merged 2 commits intomainfrom
fix-zip-error
May 28, 2025
Merged

Deploy: fixed error missing file on zip#354
jhaynie merged 2 commits intomainfrom
fix-zip-error

Conversation

@jhaynie
Copy link
Copy Markdown
Member

@jhaynie jhaynie commented May 28, 2025

got this error deploying a python langchain (although unrelated to framework):

╭──────────────────────────────────────────────────────────────────────────────────╮
│                                                                                  │
│ ☹ Error Detected                                                                 │
│                                                                                  │
│ Failed to create zip file                                                        │
│                                                                                  │
│ Error:    error opening file:                                                    │
│ /Users/jhaynie/tmp/demo/testlangchain/.venv/bin/python. open                     │
│ /Users/jhaynie/tmp/demo/testlangchain/.venv/bin/python: no such                  │
│ file or directory                                                                │
│                                                                                  │
│ Code:     CLI-0017                                                               │
│ ID:       39a73280-73ce-4899-9a51-ca7f0995ab87                                   │
│ Doc:      https://agentuity.dev/errors/CLI-0017                                  │
│ Help:     https://discord.gg/agentuity                                           │
│           support@agentuity.com                                                  │
│                                                                                  │
│                                                                                  │
╰──────────────────────────────────────────────────────────────────────────────────╯

stack is:

goroutine 190 [running]:
runtime/debug.Stack()
	/home/runner/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.2.linux-amd64/src/runtime/debug/stack.go:26 +0x64
github.com/agentuity/cli/internal/errsystem.(*errSystem).ShowErrorAndExit(0x140000ec0e0)
	/home/runner/_work/cli/cli/internal/errsystem/console.go:103 +0x80
github.com/agentuity/cli/cmd.init.func36.2()
	/home/runner/_work/cli/cli/cmd/cloud.go:482 +0x1f4
github.com/agentuity/go-common/tui.ShowSpinner.func1()
	/home/runner/go/pkg/mod/github.com/agentuity/go-common@v1.0.64/tui/spinner.go:31 +0x54
github.com/agentuity/go-common/tui.ShowSpinner.(*Spinner).Action.func2({0x14000509718?, 0x104cf6084?})
	/home/runner/go/pkg/mod/github.com/charmbracelet/huh/spinner@v0.0.0-20250313000648-36d9de46d64e/spinner.go:74 +0x24
github.com/charmbracelet/huh/spinner.(*Spinner).Init.func1()
	/home/runner/go/pkg/mod/github.com/charmbracelet/huh/spinner@v0.0.0-20250313000648-36d9de46d64e/spinner.go:131 +0x34
github.com/charmbracelet/bubbletea.(*Program).handleCommands.func1.1()
	/home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea@v1.3.4/tea.go:352 +0x64
created by github.com/charmbracelet/bubbletea.(*Program).handleCommands.func1 in goroutine 187
	/home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea@v1.3.4/tea.go:346 +0x10c

That whole directory is ignored but was still trying to open the file.

So we can check for exists before continuing. And as a slight performance optimization, we should check to see if we're ignoring before even trying to open the file.

Summary by CodeRabbit

  • Refactor
    • Improved file handling efficiency and resource management when processing files for zipping, resulting in better performance and reliability. No changes to user-facing functionality.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 28, 2025

Walkthrough

The ZipDir function was refactored to check file existence before attempting to open files. File info is now retrieved with os.Stat for optional filtering callbacks, and files are opened only after passing filters, ensuring files are opened once and properly closed.

Changes

File(s) Change Summary
internal/util/io.go Refactored ZipDir to check file existence before opening, use os.Stat for filters, and open files only after filtering, improving resource management.

Poem

In the warren where files abound,
Some hop away and can't be found.
Now ZipDir checks, with gentle care,
Skipping files that aren't there.
The archive's made, no error sound—
Missing files? They won't confound!
🐇✨

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • CLI-0017: Entity not found: Issue - Could not find referenced Issue.

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 04a73c0 and 5adb7c2.

📒 Files selected for processing (1)
  • internal/util/io.go (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • internal/util/io.go
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Test CLI Upgrade Path (windows-latest)
✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@jhaynie jhaynie requested a review from pec1985 May 28, 2025 04:58
@jhaynie jhaynie merged commit 8645857 into main May 28, 2025
14 checks passed
@jhaynie jhaynie deleted the fix-zip-error branch May 28, 2025 15:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant